<?php $distinctReceipts = $data->getDistinctReceipts(); ?>

<?php if (count($distinctReceipts) == 1): ?>
	<a href="<?php echo $this->createUrl('/receipt/view', array('id' => $distinctReceipts[0]->id)); ?>" class="blue link" target="_blank">
		<?php echo ($distinctReceipts[0]->deleted ? '<del>' : ''); ?>
		<?php echo (!empty($distinctReceipts[0]->payment_number) ? '#' . $distinctReceipts[0]->payment_number : '-'); ?>

		<?php echo ($receipt->deleted ? '</del>' : ''); ?>
	</a>
<?php elseif (count($distinctReceipts) > 1): ?>
	<ul class="unordered-list" style="margin-bottom">
		<?php foreach ($distinctReceipts as $receipt): ?>
			<li>
				<a href="<?php echo $this->createUrl('/receipt/view', array('id' => $receipt->id)); ?>" class="<?php echo ($receipt->deleted == '0') ? 'blue' : 'red'; ?> link" target="_blank">
					<?php echo ($receipt->deleted ? '<del>' : ''); ?>
					<?php echo (!empty($receipt->payment_number) ? '#' . $receipt->payment_number : '-'); ?>
					<?php echo ($receipt->deleted ? '</del>' : ''); ?>
				</a>
			</li>
		<?php endforeach; ?>
	</ul>
<?php else: ?>
	(None)
<?php endif; ?>